using UnityEngine;

public class TiltAround : MonoBehaviour
{
	private Quaternion localRotation;

	public float speed = 1f;

	private void Start()
	{
		localRotation = base.transform.rotation;
	}

	private void Update()
	{
		float num = Time.deltaTime * speed;
		ref Quaternion reference = ref localRotation;
		float y = reference.y;
		Vector3 acceleration = Input.acceleration;
		reference.y = y + acceleration.x * num;
		ref Quaternion reference2 = ref localRotation;
		float x = reference2.x;
		Vector3 acceleration2 = Input.acceleration;
		reference2.x = x + acceleration2.y * num;
		base.transform.rotation = localRotation;
	}
}
